package cn.sherer.beans.weixin;

import java.io.Serializable;

/**
 * 企业微信客服菜单消息子项
 * https://developer.work.weixin.qq.com/document/path/94670#%E8%8F%9C%E5%8D%95%E6%B6%88%E6%81%AF
 */
public class WxKfMsgMenuSubitem implements Serializable {
    private String type;
    private WxKfMsgMenuClickSubitem click;
    private WxKfMsgMenuViewSubitem view;
    private WxKfMsgMenuMiniprogramSubitem miniprogram;
    private WxKfMsgMenuTextSubitem text;

    public WxKfMsgMenuSubitem() {
    }

    public WxKfMsgMenuSubitem(String type, WxKfMsgMenuClickSubitem click) {
        this.type = type;
        this.click = click;
    }

    public WxKfMsgMenuSubitem(String type, WxKfMsgMenuViewSubitem view) {
        this.type = type;
        this.view = view;
    }

    public WxKfMsgMenuSubitem(String type, WxKfMsgMenuMiniprogramSubitem miniprogram) {
        this.type = type;
        this.miniprogram = miniprogram;
    }

    public WxKfMsgMenuSubitem(String type, WxKfMsgMenuTextSubitem text) {
        this.type = type;
        this.text = text;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public WxKfMsgMenuClickSubitem getClick() {
        return click == null ? new WxKfMsgMenuClickSubitem() : click;
    }

    public void setClick(WxKfMsgMenuClickSubitem click) {
        this.click = click;
    }

    public WxKfMsgMenuViewSubitem getView() {
        return view == null ? new WxKfMsgMenuViewSubitem() : view;
    }

    public void setView(WxKfMsgMenuViewSubitem view) {
        this.view = view;
    }

    public WxKfMsgMenuMiniprogramSubitem getMiniprogram() {
        return miniprogram == null ? new WxKfMsgMenuMiniprogramSubitem() : miniprogram;
    }

    public void setMiniprogram(WxKfMsgMenuMiniprogramSubitem miniprogram) {
        this.miniprogram = miniprogram;
    }

    public WxKfMsgMenuTextSubitem getText() {
        return text == null ? new WxKfMsgMenuTextSubitem() : text;
    }

    public void setText(WxKfMsgMenuTextSubitem text) {
        this.text = text;
    }

    @Override
    public String toString() {
        return "WxKfMsgMenuSubitem{" + "type=" + type + ", click=" + click + ", view=" + view + ", miniprogram=" + miniprogram + ", text=" + text + "}";
    }
}
